package com.qf.demo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 通过配置类 修改 静态资源的默认存放路径
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
/*    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 这种方式也会覆盖掉默认的web静态资源目录
        registry.addResourceHandler("/**")
                .addResourceLocations("\"classpath:static/,classpath:mystatic/");
    }*/
}
